Integrand size = 28, antiderivative size = 144 \[ \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\cot (c+d x)}} \, dx=-\frac {2 (-1)^{3/4} \sqrt {a} \arctan \left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {(1+i) \sqrt {a} \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d} \]
-2*(-1)^(3/4)*arctan((-1)^(3/4)*a^(1/2)*tan(d*x+c)^(1/2)/(a+I*a*tan(d*x+c) )^(1/2))*a^(1/2)*cot(d*x+c)^(1/2)*tan(d*x+c)^(1/2)/d-(1+I)*arctanh((1+I)*a ^(1/2)*tan(d*x+c)^(1/2)/(a+I*a*tan(d*x+c))^(1/2))*a^(1/2)*cot(d*x+c)^(1/2) *tan(d*x+c)^(1/2)/d
Time = 0.39 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.08 \[ \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\cot (c+d x)}} \, dx=\frac {\sqrt {\cot (c+d x)} \sqrt {i a \tan (c+d x)} \left (2 \sqrt {a} \text {arcsinh}\left (\frac {\sqrt {i a \tan (c+d x)}}{\sqrt {a}}\right ) \sqrt {1+i \tan (c+d x)}-\sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {i a \tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {a+i a \tan (c+d x)}\right )}{d \sqrt {a+i a \tan (c+d x)}} \]
(Sqrt[Cot[c + d*x]]*Sqrt[I*a*Tan[c + d*x]]*(2*Sqrt[a]*ArcSinh[Sqrt[I*a*Tan [c + d*x]]/Sqrt[a]]*Sqrt[1 + I*Tan[c + d*x]] - Sqrt[2]*ArcTanh[(Sqrt[2]*Sq rt[I*a*Tan[c + d*x]])/Sqrt[a + I*a*Tan[c + d*x]]]*Sqrt[a + I*a*Tan[c + d*x ]]))/(d*Sqrt[a + I*a*Tan[c + d*x]])
Time = 0.73 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.87, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3042, 4729, 3042, 4046, 3042, 4027, 218, 4082, 65, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\cot (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\cot (c+d x)}}dx\) |
\(\Big \downarrow \) 4729 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \sqrt {\tan (c+d x)} \sqrt {i \tan (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \sqrt {\tan (c+d x)} \sqrt {i \tan (c+d x) a+a}dx\) |
\(\Big \downarrow \) 4046 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {\int \frac {\sqrt {i \tan (c+d x) a+a} (\tan (c+d x) a+i a)}{\sqrt {\tan (c+d x)}}dx}{a}-i \int \frac {\sqrt {i \tan (c+d x) a+a}}{\sqrt {\tan (c+d x)}}dx\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {\int \frac {\sqrt {i \tan (c+d x) a+a} (\tan (c+d x) a+i a)}{\sqrt {\tan (c+d x)}}dx}{a}-i \int \frac {\sqrt {i \tan (c+d x) a+a}}{\sqrt {\tan (c+d x)}}dx\right )\) |
\(\Big \downarrow \) 4027 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {\int \frac {\sqrt {i \tan (c+d x) a+a} (\tan (c+d x) a+i a)}{\sqrt {\tan (c+d x)}}dx}{a}-\frac {2 a^2 \int \frac {1}{-\frac {2 \tan (c+d x) a^2}{i \tan (c+d x) a+a}-i a}d\frac {\sqrt {\tan (c+d x)}}{\sqrt {i \tan (c+d x) a+a}}}{d}\right )\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {\int \frac {\sqrt {i \tan (c+d x) a+a} (\tan (c+d x) a+i a)}{\sqrt {\tan (c+d x)}}dx}{a}-\frac {(1+i) \sqrt {a} \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\right )\) |
\(\Big \downarrow \) 4082 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {i a \int \frac {1}{\sqrt {\tan (c+d x)} \sqrt {i \tan (c+d x) a+a}}d\tan (c+d x)}{d}-\frac {(1+i) \sqrt {a} \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\right )\) |
\(\Big \downarrow \) 65 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {2 i a \int \frac {1}{1-\frac {i a \tan (c+d x)}{i \tan (c+d x) a+a}}d\frac {\sqrt {\tan (c+d x)}}{\sqrt {i \tan (c+d x) a+a}}}{d}-\frac {(1+i) \sqrt {a} \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\right )\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (-\frac {2 (-1)^{3/4} \sqrt {a} \arctan \left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {(1+i) \sqrt {a} \text {arctanh}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\right )\) |
((-2*(-1)^(3/4)*Sqrt[a]*ArcTan[((-1)^(3/4)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqr t[a + I*a*Tan[c + d*x]]])/d - ((1 + I)*Sqrt[a]*ArcTanh[((1 + I)*Sqrt[a]*Sq rt[Tan[c + d*x]])/Sqrt[a + I*a*Tan[c + d*x]]])/d)*Sqrt[Cot[c + d*x]]*Sqrt[ Tan[c + d*x]]
3.8.55.3.1 Defintions of rubi rules used
Int[1/(Sqrt[(b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[2 Sub st[Int[1/(b - d*x^2), x], x, Sqrt[b*x]/Sqrt[c + d*x]], x] /; FreeQ[{b, c, d }, x] && !GtQ[c, 0]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[-2*a*(b/f) Subst[Int[1/(a*c - b*d - 2* a^2*x^2), x], x, Sqrt[c + d*Tan[e + f*x]]/Sqrt[a + b*Tan[e + f*x]]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && N eQ[c^2 + d^2, 0]
Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[(a*c - b*d)/a Int[Sqrt[a + b*Tan[e + f *x]]/Sqrt[c + d*Tan[e + f*x]], x], x] + Simp[d/a Int[Sqrt[a + b*Tan[e + f *x]]*((b + a*Tan[e + f*x])/Sqrt[c + d*Tan[e + f*x]]), x], x] /; FreeQ[{a, b , c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^ 2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(B/f) Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[ a^2 + b^2, 0] && EqQ[A*b + a*B, 0]
Int[(cot[(a_.) + (b_.)*(x_)]*(c_.))^(m_.)*(u_), x_Symbol] :> Simp[(c*Cot[a + b*x])^m*(c*Tan[a + b*x])^m Int[ActivateTrig[u]/(c*Tan[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] && !IntegerQ[m] && KnownTangentIntegrandQ[u, x]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 538 vs. \(2 (114 ) = 228\).
Time = 42.17 (sec) , antiderivative size = 539, normalized size of antiderivative = 3.74
method | result | size |
default | \(\frac {\left (-\frac {1}{4}+\frac {i}{4}\right ) \left (i \sqrt {2}\, \ln \left (\frac {\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}+\csc \left (d x +c \right )-\cot \left (d x +c \right )-1}{-\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}+\csc \left (d x +c \right )-\cot \left (d x +c \right )-1}\right )-i \sqrt {2}\, \ln \left (\frac {-\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}+\csc \left (d x +c \right )-\cot \left (d x +c \right )-1}{\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}+\csc \left (d x +c \right )-\cot \left (d x +c \right )-1}\right )+4 i \ln \left (\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}+1\right )-4 i \ln \left (\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}-1\right )-4 \sqrt {2}\, \arctan \left (\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}+1\right )-4 \sqrt {2}\, \arctan \left (\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}-1\right )-\sqrt {2}\, \ln \left (\frac {\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}+\csc \left (d x +c \right )-\cot \left (d x +c \right )-1}{-\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}+\csc \left (d x +c \right )-\cot \left (d x +c \right )-1}\right )-\sqrt {2}\, \ln \left (\frac {-\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}+\csc \left (d x +c \right )-\cot \left (d x +c \right )-1}{\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\, \sqrt {2}+\csc \left (d x +c \right )-\cot \left (d x +c \right )-1}\right )+8 \arctan \left (\sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}\right )\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \cos \left (d x +c \right )}{d \left (i \cos \left (d x +c \right )+i-\sin \left (d x +c \right )\right ) \sqrt {\cot \left (d x +c \right )}\, \sqrt {\cot \left (d x +c \right )-\csc \left (d x +c \right )}}\) | \(539\) |
(-1/4+1/4*I)/d*(I*2^(1/2)*ln(((cot(d*x+c)-csc(d*x+c))^(1/2)*2^(1/2)+csc(d* x+c)-cot(d*x+c)-1)/(-(cot(d*x+c)-csc(d*x+c))^(1/2)*2^(1/2)+csc(d*x+c)-cot( d*x+c)-1))-I*2^(1/2)*ln((-(cot(d*x+c)-csc(d*x+c))^(1/2)*2^(1/2)+csc(d*x+c) -cot(d*x+c)-1)/((cot(d*x+c)-csc(d*x+c))^(1/2)*2^(1/2)+csc(d*x+c)-cot(d*x+c )-1))+4*I*ln((cot(d*x+c)-csc(d*x+c))^(1/2)+1)-4*I*ln((cot(d*x+c)-csc(d*x+c ))^(1/2)-1)-4*2^(1/2)*arctan((cot(d*x+c)-csc(d*x+c))^(1/2)*2^(1/2)+1)-4*2^ (1/2)*arctan((cot(d*x+c)-csc(d*x+c))^(1/2)*2^(1/2)-1)-2^(1/2)*ln(((cot(d*x +c)-csc(d*x+c))^(1/2)*2^(1/2)+csc(d*x+c)-cot(d*x+c)-1)/(-(cot(d*x+c)-csc(d *x+c))^(1/2)*2^(1/2)+csc(d*x+c)-cot(d*x+c)-1))-2^(1/2)*ln((-(cot(d*x+c)-cs c(d*x+c))^(1/2)*2^(1/2)+csc(d*x+c)-cot(d*x+c)-1)/((cot(d*x+c)-csc(d*x+c))^ (1/2)*2^(1/2)+csc(d*x+c)-cot(d*x+c)-1))+8*arctan((cot(d*x+c)-csc(d*x+c))^( 1/2)))*(a*(1+I*tan(d*x+c)))^(1/2)*cos(d*x+c)/(I*cos(d*x+c)+I-sin(d*x+c))/c ot(d*x+c)^(1/2)/(cot(d*x+c)-csc(d*x+c))^(1/2)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 470 vs. \(2 (108) = 216\).
Time = 0.28 (sec) , antiderivative size = 470, normalized size of antiderivative = 3.26 \[ \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\cot (c+d x)}} \, dx=-\frac {1}{4} \, \sqrt {\frac {8 i \, a}{d^{2}}} \log \left ({\left (\sqrt {2} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {\frac {8 i \, a}{d^{2}}} + 4 i \, a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + \frac {1}{4} \, \sqrt {\frac {8 i \, a}{d^{2}}} \log \left (-{\left (\sqrt {2} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {\frac {8 i \, a}{d^{2}}} - 4 i \, a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) - \frac {1}{4} \, \sqrt {\frac {4 i \, a}{d^{2}}} \log \left (-16 \, {\left (\sqrt {2} {\left (i \, a d e^{\left (3 i \, d x + 3 i \, c\right )} - i \, a d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {\frac {4 i \, a}{d^{2}}} + 3 \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} - a^{2}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) + \frac {1}{4} \, \sqrt {\frac {4 i \, a}{d^{2}}} \log \left (-16 \, {\left (\sqrt {2} {\left (-i \, a d e^{\left (3 i \, d x + 3 i \, c\right )} + i \, a d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} \sqrt {\frac {4 i \, a}{d^{2}}} + 3 \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} - a^{2}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}\right ) \]
-1/4*sqrt(8*I*a/d^2)*log((sqrt(2)*(d*e^(2*I*d*x + 2*I*c) - d)*sqrt(a/(e^(2 *I*d*x + 2*I*c) + 1))*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c ) - 1))*sqrt(8*I*a/d^2) + 4*I*a*e^(I*d*x + I*c))*e^(-I*d*x - I*c)) + 1/4*s qrt(8*I*a/d^2)*log(-(sqrt(2)*(d*e^(2*I*d*x + 2*I*c) - d)*sqrt(a/(e^(2*I*d* x + 2*I*c) + 1))*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1 ))*sqrt(8*I*a/d^2) - 4*I*a*e^(I*d*x + I*c))*e^(-I*d*x - I*c)) - 1/4*sqrt(4 *I*a/d^2)*log(-16*(sqrt(2)*(I*a*d*e^(3*I*d*x + 3*I*c) - I*a*d*e^(I*d*x + I *c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e ^(2*I*d*x + 2*I*c) - 1))*sqrt(4*I*a/d^2) + 3*a^2*e^(2*I*d*x + 2*I*c) - a^2 )*e^(-2*I*d*x - 2*I*c)) + 1/4*sqrt(4*I*a/d^2)*log(-16*(sqrt(2)*(-I*a*d*e^( 3*I*d*x + 3*I*c) + I*a*d*e^(I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1) )*sqrt((I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) - 1))*sqrt(4*I*a/d ^2) + 3*a^2*e^(2*I*d*x + 2*I*c) - a^2)*e^(-2*I*d*x - 2*I*c))
\[ \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\cot (c+d x)}} \, dx=\int \frac {\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}{\sqrt {\cot {\left (c + d x \right )}}}\, dx \]
\[ \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\cot (c+d x)}} \, dx=\int { \frac {\sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {\cot \left (d x + c\right )}} \,d x } \]
\[ \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\cot (c+d x)}} \, dx=\int { \frac {\sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {\cot \left (d x + c\right )}} \,d x } \]
Timed out. \[ \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\cot (c+d x)}} \, dx=\int \frac {\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{\sqrt {\mathrm {cot}\left (c+d\,x\right )}} \,d x \]